-
Notifications
You must be signed in to change notification settings - Fork 8k
ext/exif: Replace zend_parse_parameters() with ZEND_PARSE_PARAMETERS macros #21126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
TimWolla
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is done, it should be consistently done for exif_imagetype() as well.
So I'm not sure whether that's really a good motivation here. |
|
I think fast ZPP is indirectly more secure, because null-safety is part of it. |
I don't understand what you mean? |
PHP_FUNCTION(my_function)
{
zend_string *my_str;
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(my_str)
ZEND_PARSE_PARAMETERS_END();
php_printf("String value: '%s'\n", ZSTR_VAL(my_str)); //This value is never NULL
} |
|
Sorry, I’m confused. |
I don't see why this is an issue with "old" ZPP? Especially fast ZPP can still have this issue if the parameter is optional. |
|
Thank you |
This replaces
zend_parse_parameters()with theZEND_PARSE_PARAMETERS_START/ENDmacros, which provideexception-aware parameter parsing and align the code with modern
php-srcconventions.